package com.wiscamp.ninechapters.panels.application.assemblers;


import com.wiscamp.ninechapters.panels.application.command.CreateApplicationCommand;
import com.wiscamp.ninechapters.panels.application.command.UpdateApplicationCommand;
import com.wiscamp.ninechapters.panels.application.vo.ApplicationVO;
import com.wiscamp.ninechapters.panels.domain.entities.Application;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
        nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface ApplicationAssembler {
    ApplicationAssembler Instance = Mappers.getMapper(ApplicationAssembler.class);

    ApplicationVO toApplicationVO(Application entity);

    Application fromCreateCommand(CreateApplicationCommand createCommand);

    Application fromUpdateCommand(UpdateApplicationCommand updateCommand);

}
